This was causing pending (mocked) XHR requests to sometimes be
cleaned up prematurely.
As a general rule, setup always calls its parent first. And teardown
always calls its parent last. The inner callback runs within the
scope of the outer one and should still have acces to the sinon mocks.
Change-Id: Ic4d9243c04af73e529b689e650d35ddabaa7f4b9
}
},
teardown: function () {
- this.sandbox.verifyAndRestore();
-
if ( localEnv.teardown ) {
localEnv.teardown.call( this );
}
+
+ this.sandbox.verifyAndRestore();
}
} );
};